package org.news.web.domain.bo;

import org.news.web.domain.News;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 新闻功能业务对象 news
 *
 * @author Gu Ci
 * @date 2024-04-03
 */
@Data
@AutoMapper(target = News.class, reverseConvertGenerate = false)
public class NewsBo {

    /**
     * 新闻ID，唯一标识每篇新闻的编号
     */
//    @NotNull(message = "新闻ID，唯一标识每篇新闻的编号不能为空", groups = { EditGroup.class })
    private Long newsId;

    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = { AddGroup.class, EditGroup.class })
    private String title;

    /**
     * 封面图片id
     */
    @NotBlank(message = "封面图片id不能为空", groups = { AddGroup.class, EditGroup.class })
    private String cover;

    /**
     * 新闻内容
     */
    @NotBlank(message = "新闻内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 新闻简介
     */
//    @NotBlank(message = "新闻简介不能为空", groups = { AddGroup.class, EditGroup.class })
    private String introduction;

    /**
     * 新闻作者或来源
     */
    @NotBlank(message = "新闻作者或来源不能为空", groups = { AddGroup.class, EditGroup.class })
    private String author;



    /**
     * 新闻作者属于栏目还是作者
     */
    @NotBlank(message = "新闻作者属于栏目还是作者不能为空", groups = { AddGroup.class, EditGroup.class })
    private String authorType;

    /**
     * 新闻申请状态： 草稿或已发布 待审核  通过 打回
     */
//    @NotNull(message = "新闻申请状态： 草稿或已发布 待审核  通过 打回不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long applyStatus;

    /**
     * 打回信息
     */
//    @NotBlank(message = "打回信息不能为空", groups = { AddGroup.class, EditGroup.class })
    private String applyInfo;

    /**
     * 新闻发布时间
     */
    @NotNull(message = "新闻发布时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date publishTime;

    /**
     * 记录创建时间
     */
//    @NotNull(message = "记录创建时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date creationTime;

    /**
     * 标签
     */
//    @NotBlank(message = "标签不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tags;

    private String relatedKey;

    /**
     * 类别
     */
    @NotBlank(message = "类别不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categories;

    /**
     * 浏览量
     */
//    @NotNull(message = "浏览量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long views;

    /**
     * 点赞数量
     */
//    @NotNull(message = "点赞数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long likes;

    /**
     * 收藏数量
     */
//    @NotNull(message = "收藏数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long favorites;

    /**
     * 热度
     */
//    @NotNull(message = "热度不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long hotness;

    /**
     * 评论数量
     */
//    @NotNull(message = "评论数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long comments;


}
